package com.bw.car.view

import android.Manifest
import android.content.pm.PackageManager
import android.graphics.Camera
import android.os.Build
import android.view.SurfaceHolder
import androidx.annotation.RequiresApi
import com.alibaba.android.arouter.facade.annotation.Route
import com.bw.base.constants.RoutePath
import com.bw.car.databinding.ActivityCodeRecordBinding
import com.bw.car.net.CarViewModel
import com.bw.common.view.BaseMvvmActivity


/**
 *  车牌识别
 */
@Route(path = RoutePath.PATH_CAR_EDIT_CODE)
class CodeRecordActivity : BaseMvvmActivity<ActivityCodeRecordBinding,CarViewModel>(){

    private var mCamera: Camera? = null

    private var holder: SurfaceHolder? = null

    @RequiresApi(Build.VERSION_CODES.M)
    override fun initView() {
//        holder=binding.surface.holder
//
//        holder?.addCallback(object :SurfaceHolder.Callback{
//            override fun surfaceCreated(p0: SurfaceHolder) {
//
//            }
//
//            override fun surfaceChanged(p0: SurfaceHolder, p1: Int, p2: Int, p3: Int) {
//
//            }
//
//            override fun surfaceDestroyed(p0: SurfaceHolder) {
//
//            }
//
//        })
//
//
//        if(checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){
//            requestPermissions(arrayOf(Manifest.permission.CAMERA),104)
//        } else {
//
//        }
    }

    override fun initData() {

    }



}